import cookie from "@/utils/cookie";
import request from "@/utils/request";
function getToken() {
  return request({
    url: "/Api/cgi-bin/token",
    proxyStatus: true,
    params: {
      grant_type: "client_credential",
      appid: "wx7c8148fa23a8b4ff",
      secret: "f8cf95e2fbcbe455c841df2d70eef0ce",
    },
  });
}
function getToken1() {
  return request({
    url: "/user/getToken",
    baseURL: "http://127.0.0.1:27081",
  });
}
function getList() {
  return request({
    url: "/user/getList",
    baseURL: "http://127.0.0.1:27081",
    method:"POST",
    data:{
      access_token: cookie.get("wx_access_token"),
      env: "cloud1-3gr8k60sbe5887da",
      name: "quickstartFunctions",
      type:"selectRecord"
    }
  });
}
function getCloundDouYinList() {
  return request({
    url: "/user/getCloundDouYinList",
    method:"POST",
    data:{
      access_token: cookie.get("wx_access_token"),
      pageNum:1,
      pageSize:10,
    }
  });
}
export default {
  getToken,
  getToken1,
  getList,
  getCloundDouYinList
};
